package mumu.android.Async;

import mumu.android.R;
import mumu.android.lib.Async.Future;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;

public class Async1 extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.async1);
		setTitle("mumu.android.app.async1");
		final Future future = new Future();
		findViewById(R.id.btn_1).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				future.call();
			}
		});
		findViewById(R.id.btn_2).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				future.cancle();
			}
		});
	}

}
